<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ShowMouse</title>
    <link rel="stylesheet" href="/Trees/LayUiBac/layui/css/layui.css" media="all">
</head>
<body>

<div class="layui-container">
    <div class="layui-row">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">药物名称</label>
                <div class="layui-input-block">
                    <input type="text" name="medicName" required lay-verify="required"
                           autocomplete="off" class="layui-input">
                </div>
            </div>

            <form class="layui-form" action="">
                <div class="layui-form-item">
                    <label class="layui-form-label">类别</label>
                    <div class="layui-input-block">
                        <select name="medicType" lay-verify="required" id ="medicType">
                            <option value=""></option>
                            <option value="药物">药物</option>
                            <option value="器械">器械</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">防治类型</label>
                    <div class="layui-input-block">
                        <select name="medicDisType" lay-verify="required" id="medicDisType">
                            <option value=""></option>
                            <option value="鼠害">鼠害</option>
                            <option value="病害">病害</option>
                            <option value="虫害">虫害</option>
                        </select>
                    </div>
                </div>
            </form>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">主要功效</label>
                <div class="layui-input-block">
                    <textarea name="purpose" class="layui-textarea"></textarea>
                </div>
            </div>

        </form>

    </div>
</div>


<script src="/Trees/LayUiBac/layui/layui.js"></script>
<script>
    //Demo
    layui.use('form', function () {
        let form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>
</html>